import request from '/@/utils/request';

// 查询平台抵扣券列表
export function listCoupons(query?: Object) {
  return request({
    url: '/module/coupons/list',
    method: 'get',
    params: query
  })
}

// 查询平台抵扣券详细
export function getCoupons(id?: number) {
  return request({
    url: '/module/coupons/' + id,
    method: 'get'
  })
}

// 新增平台抵扣券
export function addCoupons(data?: Object) {
  return request({
    url: '/module/coupons',
    method: 'post',
    data: data
  })
}

// 修改平台抵扣券
export function updateCoupons(data?: Object) {
  return request({
    url: '/module/coupons',
    method: 'put',
    data: data
  })
}

// 删除平台抵扣券
export function delCoupons(id?: number) {
  return request({
    url: '/module/coupons/' + id,
    method: 'delete'
  })
}

// 导出平台抵扣券
export function exportCoupons(query?: Object) {
  return request({
    url: '/module/coupons/export',
    method: 'get',
    params: query
  })
}
